package RPC.RPCServer;

import java.io.ObjectInputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class PRCServer {
    public static void main(String[] args) throws Exception {
        ServerSocket server = new ServerSocket(10086);
        while (true) {
            Socket accept = server.accept();
            System.out.println(accept.getRemoteSocketAddress());
            ObjectInputStream ois = new ObjectInputStream(accept.getInputStream());
            System.out.println(ois.readUTF());
            System.out.println(ois.readUTF());
            System.out.println(ois.readObject());

            accept.close();
        }
    }
}
